<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>百顺通云-下载中心列表</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- 公用CSS文件引入 -->
        <jsp:include page="../../admin/commonCSS.jsp"></jsp:include>
        <!-- 系统维护css -->
		<link href="/css/admin/systemManager.css" type="text/css" rel="stylesheet"  type="text/css">
		
		<!-- 图片裁剪插件 css -->
		<link href="/cdn/Jcrop-v0.9.12/css/jquery.Jcrop.css" type="text/css" rel="stylesheet"/>
		
    </head>
    <body class="skin-blue">
        
		<!-- 公用头部 -->
        <jsp:include page="../../admin/commonHeader.jsp"></jsp:include>
        
        <div class="wrapper row-offcanvas row-offcanvas-left">
            
            <!-- 公用导航 -->
            <jsp:include page="../../admin/commonMenu.jsp"></jsp:include>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                      	下载中心列表
                        <small>新增下载列表</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                        <li class="active">系统维护</li>
                        <li class="active">下载中心</li>
                        <li class="active">编辑</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content" id="addnewdownload">
                    <!-- Small boxes (Stat box) -->
                    <div class="row fixrowscroll">
						<form class="form-horizontal" role="form" id="downloadform">
							  <div class="form-group">
							    <label for="inputEmail3" class="col-sm-2 control-label">产品名称：</label>
							    <div class="col-sm-3">
							      <input type="text" name="proname" id="proname" value="${goodsDownload.goodsDownloadName}" class="form-control input-sm" placeholder="产品名称">
							    </div>
							  </div>
							  <div class="form-group">
							    <label for="inputEmail3" class="col-sm-2 control-label">产品编码：</label>
							    <div class="col-sm-3">
							      <input type="text" name="pro_code" id="pro_code" value="${goodsDownload.goodsCode}" class="form-control input-sm" placeholder="产品编码">
							    </div>
							  </div>
							  <div class="form-group proicon">
								<label for="inputPassword3" class="col-sm-2 control-label">产品图标：</label>
								<div class="col-sm-8">
								  	<div class="row">
									  <div class="col-md-5 iconcutbox">
									  	<p>仅支持jpg、png格式图片，且规格是270*290</p>
									  	<div class="iconbox">
										  		<img src="${goodsDownload.imageUrl}" id="showImg">
									  	</div>
									  	<div class="row img_buttonbox">
										  <div class="col-md-8">
										  	<div class="input-group fileinput">
											  <input type="text" id="show_imgurl" name="nshow_imgurl" value="${goodsDownload.imageUrl}" class="form-control file_showpath"/>
											  <input type="file" id="hd_imgurl" name="nhd_imgurl" class="form-control file_input">
											  <label class="input-group-addon">浏览</label>
											</div>
										  </div>
										  <div class="col-md-4 confirmcut">
										  	<button type="button" class="btn btn-default">确认并裁剪</button>
										  </div>
										</div>
									  </div>
									  <div class="col-md-4 iconrightbox" style="position:relative;">
									  	<p>预览</p>
									  	<div class="iconpreview" id="preview-pane">
									  		<img src="${goodsDownload.imageUrl}" id="crop_preview">
									  	</div>
									  	<p>270*290</p>
									  </div>
									</div>			
								</div>
							  </div>
							  
							  <div class="form-group device_version">
								<label for="inputPassword3" class="col-sm-2 control-label">版本：</label>
								<div class="col-sm-8">
								  	<div class="appsfile">
								  		<c:if test="${goodsDownload.isAndroid != 0}">
								  			<label><input type="checkbox" name="checkapk" class="simple" >安卓版</label>
								  		</c:if>
								  		<c:if test="${goodsDownload.isAndroid == 0}">
								  			<label><input type="checkbox" name="checkapk" class="simple" checked>安卓版</label>
								  		</c:if>
								  		<div class="input-group filebox">
										  <input type="text" name="filepath" value="${goodsDownload.androidUrl}"  class="form-control file_showpath">
									      <input type="file" id="file_android" name="nfile_android" class="form-control file_input" data-checktype="android">
										  <label class="input-group-addon">浏览</label>
										</div>
										<div class="qrcode" <c:if test="${goodsDownload.isAndroid == 0}">
								  			style="display: block;"
								  		</c:if>>
										    <img class="qrsmall" src="/images/admin/qrcode.png" />
											<img class="qrbig" src="/images/admin/kong.gif" data-qrcodeUrl="${goodsDownload.androidImageUrl}" />
										</div>
								  	</div>
								  	<div class="appsfile">
								  		<c:if test="${goodsDownload.isIos != 0}">
								  			<label><input type="checkbox" name="checkios" class="simple">IOS版</label>
								  		</c:if>
								  		<c:if test="${goodsDownload.isIos == 0}">
								  			<label><input type="checkbox" name="checkios" class="simple" checked>IOS版</label>
								  		</c:if>
								  		<div class="input-group filebox">
										  <input type="text" name="filepath" value="${goodsDownload.iosUrl}"  class="form-control file_showpath">
										  <input type="file" id="file_ios" name="nfile_ios" class="form-control file_input" data-checktype="ios">
										  <label class="input-group-addon">浏览</label>
										</div>
										<div class="qrcode" <c:if test="${goodsDownload.isIos == 0}">style="display: block;"</c:if>>
										    <img class="qrsmall" src="/images/admin/qrcode.png" />
											<img class="qrbig" src="/images/admin/kong.gif"  data-qrcodeUrl="${goodsDownload.iosImageUrl}" />
										</div>
										
								  	</div>
								  	<div class="appsfile">
								  		<c:if test="${goodsDownload.isPc != 0}">
								  			<label><input type="checkbox" name="checkpc" class="simple">PC版</label>
								  		</c:if>
								  		<c:if test="${goodsDownload.isPc == 0}">
								  			<label><input type="checkbox" name="checkpc" class="simple" checked>PC版</label>
								  		</c:if>
								  		<div class="input-group filebox">
										  <input type="text" name="filepath"  value="${goodsDownload.pcUrl}" class="form-control file_showpath">
										  <input type="file" id="file_pc" name="nfile_pc" class="form-control file_input" data-checktype="exe">
										  <label class="input-group-addon">浏览</label>
										</div>
								  	</div>
								  	<div class="appsfile pc_deskurl">
								  		<c:if test="${goodsDownload.isInk != 0}">
								  			<label><input type="checkbox" name="checkdeskurl" class="simple">桌面快捷方式：&emsp;&emsp;&emsp;URL</label>
								  		</c:if>
								  		<c:if test="${goodsDownload.isInk == 0}">
								  			<label><input type="checkbox" name="checkdeskurl" class="simple" checked>桌面快捷方式：&emsp;&emsp;&emsp;URL</label>
								  		</c:if>
								  		<div class="input-group filebox">
										  <fieldset>
										  	<input type="text" id="desk_url" name="ndesk_url" value="${goodsDownload.inkUrl}"  class="form-control">
									 	 </fieldset>
										</div>
								  	</div>
								</div>
							  </div>
							  
							  <div class="form-group">
							    <label for="inputEmail3" class="col-sm-2 control-label">产品口号：</label>
							    <div class="col-sm-3">
							      <input type="text" name="slogan" id="slogan" value="${goodsDownload.slogan}" class="form-control input-sm" placeholder="产品口号">
							    </div>
							  </div>
							  
							  <div class="form-group">
							    <label for="inputEmail3" class="col-sm-2 control-label">产品描述：</label>
							    <div class="col-sm-3">
							      <textarea rows="5" id="pro_decoration">${goodsDownload.goodsDownloadDescribe}</textarea>
							    </div>
							  </div>
							  <div class="form-group">
							    <label for="inputEmail3" class="col-sm-2 control-label">适用场景：</label>
							    <div class="col-sm-3">
							      <textarea rows="5" id="pro_adapter">${goodsDownload.adapter}</textarea>
							    </div>
							  </div>

							  <div class="form-group">
							    <div class="col-sm-6 operatorbuttons">
							      <button type="button"  class="btn btn-default submit">确定</button>
							      <a href="javascript:history.back(-1)" class="btn btn-default preview">取消</a>
							    </div>
							  </div>
						</form>
						
						
                    </div><!-- /.row -->
                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->
		<script type="text/javascript">
			var currentMenu = 'systemManager';
			var href = location.href,
				index = href.lastIndexOf('/'),
				download_id = undefined ;
			if( index >= 0 ){
				download_id = href.substring( index + 1 );
				if( !/^[1-9]\d*/gi.test( download_id ) ){
					download_id = undefined;
				};
			}; 
		</script>
		<!-- 公用js文件引入 -->
        <jsp:include page="../../admin/commonJs.jsp"></jsp:include>
        <!-- 图片上传 js -->
		<script src="/js/ajaxfileupload.js"></script>
		<!-- 图片裁剪插件 js -->
		<script src="/cdn/Jcrop-v0.9.12/js/jquery.Jcrop.min.js"></script>
		
		<script src="/js/admin/systemManager/addDownLoadLink.js"></script>
    </body>
</html>
